// Description：瞬曜电子诚征英才
//
// Copyright 2021 by 瞬曜电子科技（上海）有限公司
// 本软件为使用Lesser General Public License Version 3的免费软件。
// Gitee: https://gitee.com/shunyaocad/new-hire

class verification_ip_expert extends verification_expert #(
  .COMPANY(shunyaocad)
);

  rand int years_of_verification_experience;
  rand verification_methodologies_e verification_methodologies;
  rand protocols_e protocols;
  rand programming_languages_e programming_languages;
  rand string location;
  
  constraint years_of_verification_experience_c {
    soft years_of_verification_experience > 5;
  }

  constraint verification_methodologies_c{
    verification_methodologies == UVM;
  }  

  constraint protocols_c{
    protocols dist {
       [AMBA, DDR, PCIe] := 3,
       [USB, CXL, CCIX]  := 2,
       Others            := 1
    };
  }
  
  constraint programming_languages_c{
    programming_languages inside {SV, Verilog, Python, Scala, Chisel, C, C++};
  }

  constraint location_c{
    location inside {"Shannghai", "Beijing", "Hsinchu", "Home", "Coffee Shop", "Bar"};
  }

  `uvm_component_utils_begin(verification_ip_expert)
    `uvm_field_int     (years_of_verification_experience, UVM_DEFAULT)
    `uvm_field_enum    (verification_methodologies, UVM_DEFAULT)
    `uvm_field_enum    (protocols, UVM_DEFAULT)
    `uvm_field_enum    (programming_languages, UVM_DEFAULT)
    `uvm_field_string  (location, UVM_DEFAULT)
  `uvm_component_utils_end

  function new(string name = "verification_ip_expert", uvm_component parent);
    super.new(name, parent);
  endfunction

  virtual function void connect_phase(uvm_phase phase);
    `uvm_info(get_type_name(), 
      "Please send your resume to : hr@shunyaocad.com", UVM_LOW);
  endfunction

  virtual task run_phase(uvm_phase phase);
    fork
      study_protocol();
      develop_vip_framwork();
      develop_vip_component();
      collabrate_with_others_vip_experts();

      get_response(resonably_high_salary);
    join
  endtask
endclass
